package com.xinqi.modules.prepare.courseware.service;

import com.xinqi.common.base.response.PageInfo;
import com.xinqi.common.base.response.Param;
import com.xinqi.modules.prepare.common.dto.data.PrepareCoursewareData;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewareCreateDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewareDeleteDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewareQueryDTO;
import com.xinqi.modules.prepare.courseware.dto.req.PrepareCoursewareUpdateDTO;
import com.xinqi.modules.prepare.courseware.dto.rsp.PrepareCoursewareResultDTO;

import javax.validation.Valid;
import java.util.List;

/**
 * 备课区互动课件服务层
 *
 * @author: system
 * @date: 2023/03/19
 */
public interface PrepareCoursewareService {
    /**
     * 分页查询 备课区互动课件数据
     */
    PageInfo<PrepareCoursewareResultDTO> page(Param pageable, PrepareCoursewareQueryDTO query);

    /**
     * 查询 备课区互动课件数据
     */
    List<PrepareCoursewareResultDTO> find(PrepareCoursewareQueryDTO query);

    /**
     * 根据id查询 备课区互动课件数据
     */
    PrepareCoursewareResultDTO findById(Long id);

    /**
     * 根据id查询 备课区互动课件导出数据
     */
    PrepareCoursewareData find(Long id);

    Long insert(@Valid PrepareCoursewareData data);

    /**
     * 新增 备课区互动课件数据
     */
    Long insert(@Valid PrepareCoursewareCreateDTO dto);

    /**
     * 根据id修改 备课区互动课件数据
     */
    Boolean updateById(@Valid PrepareCoursewareUpdateDTO dto);

    /**
     * 根据id删除 备课区互动课件数据
     */
    Boolean deleteById(Long id);

    /**
     * 根据id删除 备课区互动课件数据
     */
    Boolean deleteById(PrepareCoursewareDeleteDTO dto);

    /**
     * 全量更新互动课件上的切片
     *
     * @param dto
     */
    void updateCoursewareSlice(PrepareCoursewareUpdateDTO dto);

    Boolean saveBatchSlice(PrepareCoursewareCreateDTO dto, Long courseWareId, List<String> ossFileList);

}
